<?php
namespace app\index\service;

use app\index\model\LabourGongModel;

class LabourService extends CommonService
{
    public function get_labour_gong_yongxing(){
        return [
            '自有工人',
            '劳务分包',
            '临时用工',
        ];
    }

    public function check_labour_gong_name($name, $idcard, $id=0){
        return !!LabourGongModel::where(['comid'=>$this->userinfo['comid'],'name'=>$name,'idcard'=>$idcard,'deleted_user'=>0])
            ->where('id','neq', $id)->find();
    }






}
